package com.deram.ctin.serv.business.impl;

import com.deram.ctin.common.bean.PageResult;
import com.deram.ctin.serv.business.api.BusinessCourtSessionApi;
import com.deram.ctin.serv.business.entity.BaseUpdateInfo;
import com.deram.ctin.serv.business.entity.BusinessCourt;
import com.deram.ctin.serv.business.entity.BusinessCourtSession;
import com.deram.ctin.serv.business.filter.BusinessCourtSessionFilter;
import com.deram.ctin.serv.business.filter.BusinessJudgementFilter;
import com.deram.ctin.serv.business.service.BusinessCourtSessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: jtt
 * @Description:
 * @Date: 2017/9/13 15:56
 * @version: V1.0
 */
@RestController
public class BusinessCourtSessionApiImpl implements BusinessCourtSessionApi {

    @Autowired
    BusinessCourtSessionService businessCourtSessionService;

    @Override
    public List<BusinessCourtSession> list(@RequestBody BusinessCourtSessionFilter param) {
        return businessCourtSessionService.list(param);
    }

    @Override
    public BusinessCourtSession save(@RequestBody BusinessCourtSession param) {
        return businessCourtSessionService.save(param);
    }

    @Override
    public PageResult<BusinessCourtSession> search(@RequestBody BusinessCourtSessionFilter filter, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize) {
        return businessCourtSessionService.search(filter,pageNo,pageSize);
    }

    @Override
    public void delete(Long id) {
        businessCourtSessionService.delete(id);
    }

    @Override
    public void saveList(@RequestBody BaseUpdateInfo<BusinessCourtSession> updateInfo) {
        businessCourtSessionService.saveList(updateInfo);
    }
}
